#include "GMailPlugin.h"
#include "GMailContext.h"
namespace GMail
{
    using namespace TWCore;
    GMailPlugin::GMailPlugin():
		IPlugin( "GMail", "WarWithinMe", "0.31",":/GMail/GmailIcon" ){}

    GMailPlugin::~GMailPlugin() {}

    IContext* GMailPlugin::createNewContext()
    {
        GMailContext* c = new GMailContext();
        if ( !c->setup() )
        {
            delete c;
            return 0;
        }
        return c;
    }

    IContext* GMailPlugin::createContext( const QByteArray& info )
    {
        return new GMailContext( info );
    }

    void GMailPlugin::deleteContext( IContext* c )
    {
        delete c;
    }

    void GMailPlugin::unloadContext( IContext* c )
    {
        delete c;
    }
}

Q_EXPORT_PLUGIN2( GMail, GMail::GMailPlugin );
